Skip to content

Update Boolean field to support 'yes' and 'no' values #5038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

htmis
Copy link
Contributor

@htmis htmis commented Mar 30, 2017

Python Reference:
distutils.util.strtobool(val)
Convert a string representation of truth to true (1) or false (0).
True values are y, yes, t, true, on and 1; false values are n, no, f, false, off and 0. Raises ValueError if val is anything else.

Note: Before submitting this pull request, please review our contributing guidelines.

Description

Please describe your pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. When linking to an issue, please use refs #... in the description of the pull request.

Python Reference:
distutils.util.strtobool(val)
Convert a string representation of truth to true (1) or false (0).
True values are y, yes, t, true, on and 1; false values are n, no, f, false, off and 0. Raises ValueError if val is anything else.
@tomchristie
Copy link
Member

Normally I would have closed off this pull request, but I've no big problem with us aligning with strtobool for consistency.

@tomchristie tomchristie merged commit fe33b2d into encode:master Mar 30, 2017
@tomchristie tomchristie added this to the 3.6.3 Release milestone Mar 30, 2017
@jpadilla
Copy link
Member

We should probably do the same for NullBooleanField

@priyanka03thakur
Copy link

Are values "False" and "True" supported as part of this fix?

@merwok
Copy link
Contributor

merwok commented Jul 28, 2017

The diff shows that True and False were already supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants